package com.evola.dbsm.commands
{
	import com.evola.dbsm.service.impl.ProjectsService;
	import com.evola.dbsm.service.impl.ScriptService;
	import com.evola.dbsm.view.project.edit.ProjectEditEvent;
	import com.evola.dbsm.view.script.edit.ScriptEditEvent;
	
	import org.robotlegs.mvcs.Command;
	
	public class CreateScriptCommand extends Command
	{
		
		[Inject]
		public var event : ScriptEditEvent;
		
		[Inject]
		public var service : ScriptService;			
		
		override public function execute():void{
			
			service.addScript(event.script);				
		}
	}
}